
<fieldset id="searchSettings">
<legend>Настройка поиска</legend>
<?php echo $form->create('SearchOption', array('url'=>$this->here)) ?>
<ul>
<li>
	Возвраст<br />
	от <?php echo $form->text('agefrom', array('size'=>2, 'maxlength'=>2)) ?>
	до <?php echo $form->text('ageto', array('size'=>2, 'maxlength'=>2)) ?>
</li>
<li>
	<?php $relChecked = (is_array($this->data['SearchRelation']['relations']))? $this->data['SearchRelation']['relations'] : array() ?>
	Отношения<br />
	<ul>
	<?php foreach ($relations as $rid => $name): ?>
	<li>
	<?php $chkd = (in_array($rid, $relChecked))? 'checked="checked"' : '' ?>
	    <input id="rel<?php echo $rid?>" type="checkbox" name="data[SearchRelation][relations][<?php echo $rid ?>]" value="<?php echo $rid ?>" <?php echo $chkd ?> />
	    <label for="rel<?php echo $rid?>"><?php echo $name ?></label>
	<li>
	<?php endforeach ?>
	</ul>
</li>
<li>
	Город<br />
	<?php echo $form->text('city') ?>
</li>

<li><?php echo $form->submit(__('save', true)) ?></li>

</ul>
<?php echo $form->end() ?>
</fieldset>

<fieldset id="privateSettings">
<legend>Насторойка приватности</legend>
<?php $privat = array(0=>'для всех польователей', 1=>'только для зарегистрированных') ?>
<?php echo $form->create('Privacy', array('url'=>$this->here, 'id'=>'settingsForm')) ?>

<ul>
<li>
	Аккаунт<br />
	<?php echo $form->radio('account', $privat, array('legend'=>false)) ?>
</li>

<li>
	Фотки<br />
	<?php echo $form->radio('fotos', $privat, array('legend'=>false)) ?>
</li>
<li>
	E-mail<br />
	<?php echo $form->radio('pubmail', $privat, array('legend'=>false)) ?>
</li>
<li>
	ICQ<br />
	<?php echo $form->radio('icq', $privat, array('legend'=>false)) ?>
</li>
<li>
	Jabber<br />
	<?php echo $form->radio('jabber', $privat, array('legend'=>false)) ?>
</li>

<li>
	Соц Тип<br />
	<?php echo $form->radio('soctype', $privat, array('legend'=>false)) ?>
</li>

<li>
	<?php echo $form->submit(__('save', true)) ?></li>
</ul>
	<?php echo $form->end() ?>
</fieldset>

<fieldset id="chpassSettings">
<legend>Изменить пароль</legend>
	<?php echo $form->create('User', array('url'=>$this->here, 'id'=>'chpassForm')) ?>
	<ul>
		<li> <?php echo $form->input('password', array('label'=>__('password', true), 'type'=>'password', 'error'=>array('wrong'=>'не тот пароль'))) ?> </li>
		<li> <?php echo $form->input('newpassword', array('label'=>__('newpassword', true), 'type'=>'password')) ?> </li>
		<li> <?php echo $form->input('repassword', array('label'=>__('renewpassword', true), 'type'=>'password')) ?> </li>

		<li> <?php echo $form->submit(__('change', true)) ?> </li>
	</ul>
	<?php echo $form->end() ?>
</fieldset>

<?php if (isset($this->data['UsersSoctype'])): ?>
<fieldset id="searchPoint">
<legend>Участие в поиске</legend>
<?php echo $form->create('Account', array('url'=>$this->here)) ?>
<?php
	$socStatus = $this->data['UsersSoctype']['status'];
	if ($socStatus) {
		$button = __('off', true);
		$hidden = 0;
	} else {
		$button = __('on', true);
		$hidden = 1;
	}
?>
<?php echo $form->hidden('status', array('value'=>$hidden)) ?>
<ul>
	<li> <?php echo $form->submit($button) ?> </li>
</ul>
<?php echo $form->end() ?>
</fieldset>
<?php endif ?>
